import {ADD_COUNT,ADD_TO_CART} from './mutation_type.js'

export default {
	[ADD_COUNT] (state,payload){
		payload.count++
	},
	[ADD_TO_CART] (state,payload){
		payload.checked = true
		state.cartList.push(payload)
	},
	// add(state,payload){
	// 	state.cartList[payload].count+=1
	// },
	// reduce(state,payload){
	// 	if(state.cartList[payload].count>1){
	// 		state.cartList[payload].count-=1
	// 	}
	// }
}